﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using com.codeplex.eatoutadvocate.BL;

namespace EatOutAdvocate.Web.Mvc.Controllers
{
    public class RecordController : Controller
    {
        //
        // GET: /Record/

        
        public ActionResult Index()
        {
            
            return View();
        }

        /// <summary>
        /// Get the list of stored restaurants
        /// </summary>
        /// <returns>Json list of restaurants</returns>
        [HttpGet]
        public JsonResult GetRestaurants()
        {
            DataLogic dataLogic = new DataLogic();
            List<string> restaurants = dataLogic.GetRestaurants();
            return Json(restaurants, JsonRequestBehavior.AllowGet);
        }
    }
}
